from flask import Flask, request, render_template

app = Flask(__name__)
app.secret_key = 'your_secret_key'

@app.route('/')
def form():
    return render_template('uploadfile.html')

@app.route('/upload', methods=['POST'])
def upload():
    file = request.files.get('uploadfile')
    if file:
        filename = file.filename
        file.save(f'uploads/{filename}')
        return f'File uploaded successfully: {filename}'
    return 'No file uploaded'

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0')